package com.xpjhs.user.dao;

import java.util.List;





import org.springframework.data.jpa.repository.Query;

import com.xpjhs.common.util.BaseDao;
import com.xpjhs.user.model.User;

public interface UserDao extends BaseDao<User> {

	@Query("from com.xpjhs.user.model.User where username=?1 and password=?2")
	public User findUserBy(String username, String password);

	@Query("from com.xpjhs.user.model.User where username=?1")
	public User findUserByUsername(String username);

	@Query("select distinct city  from com.xpjhs.user.model.User")
	public List allCity();

	@Query("select  city from com.xpjhs.user.model.User where city=?1")
	public List findByCity(String city);

}
